﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Frame.master" AutoEventWireup="true" CodeFile="searchCar.aspx.cs" Inherits="searchCar" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleHolder" Runat="Server">
Tìm xe
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentHolder" Runat="Server">
    <script type="text/javascript">
        $(document).ready(function () {
            $("#tableOne").tablesorter({ debug: false, sortList: [[0, 0]], widgets: ['zebra'] })
            // .tablesorterPager({ container: $("#pagerOne"), positionFixed: false })
            initJQueryWidgets();
        });

        function initJQueryWidgets() {
            $("[ID$=txtFromEntry]").datepicker({
                changeMonth: true,
                changeYear: true
            });
            $("[ID$=txtToEntry]").datepicker({
                changeMonth: true,
                changeYear: true
            });
            $("[ID$=txtFromExit]").datepicker({
                changeMonth: true,
                changeYear: true
            });
            $("[ID$=txtToExit]").datepicker({
                changeMonth: true,
                changeYear: true
            });
//            $("[ID$=txtFromEntry]").attr('readOnly', 'true');
//            $("[ID$=txtToEntry]").attr('readOnly', 'true');
//            $("[ID$=txtFromExit]").attr('readOnly', 'true');
//            $("[ID$=txtToExit]").attr('readOnly', 'true');
        }

       
</script>
<asp:Label ID="lblMsg" runat="server" ForeColor="#FF3300" Visible="false"/>
 <table id="addBar" width="930" border="0" align="center" cellpadding="3" cellspacing="0" class="margin_b10">
                  
                     <tr>
                        <td align="right" width="100"> 
                            Hầm xe 
                        </td>
                        <td align="left" width="210">
                            <asp:DropDownList ID="ddlFloor" runat="server"  Width="204px" AppendDataBoundItems="true">
                                <asp:ListItem Text="" Value=""></asp:ListItem>
                            </asp:DropDownList>
                         </td>
                        <td align="right" width="60">
                            &nbsp;</td>
                        <td align="left" width="210">
                            <asp:CheckBox ID="chkCheck"  runat="server" Checked="false" Text=" Biển số vào khác biển số ra"/></td>
                                <td>
                            <asp:CheckBox ID="chkNotExit"  runat="server" Checked="false" Text=" Xe trong hầm"/></td>
                    </tr>
                     <tr>
                        <td align="right" width="100"> 
                            Loại thẻ 
                        </td>
                        <td align="left" width="210">
                            <asp:DropDownList ID="ddlCardType" runat="server" Width="204px"  AppendDataBoundItems="true">
                            <asp:ListItem Text="" Value=""></asp:ListItem>
                            </asp:DropDownList>
                         </td>
                        <td align="right" width="60">
                            Biển số 
                         </td>
                        <td align="left">
                            <asp:TextBox ID="txtPlat" runat="server" MaxLength="10" TabIndex="1" 
                                Width="196px" />
                         </td>
                                <td>&nbsp;</td>
                    </tr>
                     <tr>
                        <td align="right"  valign="bottom"> 
                            Ngày vào 
                        </td>
                        <td  valign="bottom">
                        <div id="errorEntry" style="display:none" class="errorMsg2">Vui lòng cả [từ] và [đến]</div>
                        <asp:TextBox ID="txtFromEntry" runat="server" Width="80px" TabIndex="1" 
                                MaxLength="10" />&nbsp; 
                            đến 
                            <asp:TextBox ID="txtToEntry" runat="server" Width="80px" TabIndex="1" 
                                MaxLength="10" /></td>
                        <td align="right"  valign="bottom">
                            Ngày ra 
                         </td>
                        <td align="left" valign="bottom">
                         <div id="errorExit" style="display:none" class="errorMsg2">Vui lòng cả [từ] và [đến]</div>
                            <asp:TextBox ID="txtFromExit" runat="server" Width="80px" 
                                TabIndex="1" MaxLength="10" />&nbsp; 
                            đến 
                            <asp:TextBox ID="txtToExit" runat="server" Width="80px" TabIndex="1" 
                                MaxLength="10" /></td>
                                <td><asp:ImageButton ID="btnSearch" runat="server"  OnClientClick="return CheckSearch()"
                                ImageUrl="~/images/view.gif" ToolTip="Tìm kiếm" onclick="btnSearch_Click"/></td>
                    </tr>
                   
                </table>
<div align="left" style="margin-left:110px"><asp:Label ID="lblResult" runat="server" ForeColor="#FF3300" Visible="false"/></div>
 
               <%#Eval("ParkingFloor") %>
<asp:Panel ID="pnResult" runat="server" >
               <asp:Repeater ID="rptSearch" runat="server" 
                   onitemdatabound="rptSearch_ItemDataBound">
        <HeaderTemplate>
          <table id="tableOne" class="yui margin_l30" width="930" border="0" align="left" cellpadding="3" cellspacing="1" >
                <thead>
                    <tr>
                        <th class="tableheader" width="30" rowspan="2" align="center" valign="middle">STT</th>
                        <th class="tableheader"  rowspan="2" align="center" valign="middle">Hầm</th>
                        <td class="tableheader2"  colspan="3" align="center" valign="middle">Xe vào</td>
                        <td class="tableheader2"  colspan="3" align="center" valign="middle">Xe ra</td>
                        <th class="tableheader"  rowspan="2" align="center" valign="middle">Hình</th>
                    </tr>
                    <tr>
                         <th class="tableheader" width="110" align="center" valign="middle">Biển số</th>
                        <th class="tableheader" width="100" align="center" valign="middle">Thời gian</th>
                        <th class="tableheader" width="150" align="center" valign="middle">Nhân viên</th>
                        <th class="tableheader" width="110" align="center" valign="middle">Biển số</th>
                        <th class="tableheader" width="100" align="center" valign="middle">Thời gian</th>
                        <th class="tableheader" width="150" align="center" valign="middle">Nhân viên</th>
                    </tr>
                </thead>
                <tbody>
        </HeaderTemplate>
        <ItemTemplate>
            <tr>
                <td align="center" valign="middle"><%# Container.ItemIndex + 1 %></td>
                <td align="center" valign="middle"><%#Eval("ParkingFloor") %></td>
                <td align="left" valign="middle"><%#Eval("EntryPlate")%></td>
                <td align="center" valign="middle"><%#Eval("EntryTime", "{0:dd/MM/yyyy HH:mm }")%></td>
                <td align="left" valign="middle"><%#Eval("EntryUser")%></td>
                <td align="left" valign="middle"><%#Eval("ExitPlate")%></td>
                <td align="center" valign="middle"><%#Eval("ExitTime", "{0:dd/MM/yyyy HH:mm }")%></td>
                <td align="left" valign="middle"><%#Eval("ExitUser")%></td>
                <td align="center" valign="middle">
                    <a href="javascript:void(0)" onclick="window.showModalDialog('viewImage.aspx?id=<asp:Literal ID='ltrId' runat='server' />','','dialogHeight: 550px; dialogWidth: 550px;')"><img  src="images/view.png" title="Click để xem hình" alt=""/></a></td>
                    <asp:HiddenField  ID="hdnId" runat="server" Value='<%#Eval("ID")%>'/>
            </tr>
        </ItemTemplate>
        <FooterTemplate>
        </tbody>
        </table>
        </FooterTemplate>
    </asp:Repeater>
     <%-- endlist--===================================================--%>

    <table  cellpadding="3" cellspacing="0" width="930" border="0" class="margin_l30" align="left">
	        <tr>
                <td  class="tableFooter" valign="middle" align="right">
                    <asp:ImageButton ID="btnFirst" runat="server" ImageUrl="~/images/first.png" 
                        ToolTip="Trang đầu" onclick="btnFirst_Click" /></td>
                <td  class="tableFooter" valign="middle" width="10" align="center">
                    <asp:ImageButton ID="btnPrev" runat="server" ImageUrl="~/images/prev.png" 
                        ToolTip="Trang trước" onclick="btnPrev_Click" /></td>
                <td  class="tableFooter"  valign="middle"  align="center" width="30"><asp:Literal ID="ltrPage" runat="server"  Text="0/0"/></td>
	            <td  class="tableFooter" valign="middle"  align="center" width="10">
                    <asp:ImageButton ID="btnNext" runat="server" ImageUrl="~/images/next.png" 
                        ToolTip="Trang sau" onclick="btnNext_Click" />
		          
		        </td>
                <td  class="tableFooter" valign="middle"  align="left">
                    <asp:ImageButton ID="btnLast" runat="server" ImageUrl="~/images/last.png" 
                        ToolTip="Trang cuối" onclick="btnLast_Click" /></td>
	        </tr>
	    
    </table>
    </asp:Panel>
              
           
</asp:Content>

